package com.yqg.protection.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yqg.protection.cover.ClientStateConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * client 实体类
 *
 * @author zxf
 * @since 2024-07-24
 */
@Getter
@Setter
@Data
@ApiModel(value = "Client对象", description = "")
public class Client implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "单位ID", index = 0)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty(value = "组织ID", index = 1)
    private Long organization;

    @ExcelProperty(value = "地址", index = 2)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String address;

    @ExcelProperty(value = "单位名称", index = 3)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String name;

    @ExcelProperty(value = "单位照片", index = 4)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String photo;

    @ExcelProperty(value = "单位logo", index = 5)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String logo;

    @ExcelProperty(value = "点位图", index = 6)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("点位图")
    private String pointMap;

    @ExcelProperty(value = "单位状态", index = 7, converter = ClientStateConverter.class)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("(0正常，1冻结，2暂停使用)")
    private String state;

    @ExcelProperty(value = "说明", index = 8)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String explanation;

    @ExcelIgnore
    @ApiModelProperty("（0正常，1删除）")
    private Integer isDelete;

    @ExcelProperty(value = "联系人", index = 9)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("联系人")
    private String linkman;

    @ExcelProperty(value = "接警人", index = 10)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("接警人")
    private String dispatcher;

    @ExcelProperty(value = "接警领导", index = 11)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("接警领导")
    private String dispatchSupervisor;

    @ExcelProperty(value = "值班员", index = 12)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("值班员")
    private String receptionist;

    @ExcelProperty(value = "联系人电话", index = 13)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("联系人电话")
    private String teleLinkman;

    @ExcelProperty(value = "接警人电话", index = 14)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("接警人电话")
    private String teleDispatcher;

    @ExcelProperty(value = "接警领导电话", index = 15)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("接警领导电话")
    private String teleDispatchSupervisor;

    @ExcelProperty(value = "值班员电话", index = 16)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("值班员电话")
    private String teleReceptionist;

    @ExcelProperty(value = "经度", index = 17)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("经度")
    private String longitude;

    @ExcelProperty(value = "纬度", index = 18)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty("纬度")
    private String latitude;

    @ExcelProperty(value = "组织名称", index = 19)
    @TableField(exist = false)
    private String organizationName;

    @ExcelProperty(value = "上级单位ID", index = 20)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long pcId;

    @ExcelProperty(value = "上级单位名称", index = 21)
    @TableField(exist = false)
    private String pcName;

    @ExcelProperty(value = "物联云API密钥", index = 22)
    private String monitorkey;

    @ExcelIgnore
    @TableField(exist = false)
    private List children;
}
